package cn.hdu.liang.ccio;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class IO {
    public static void dump(InputStream src, OutputStream dest) throws IOException {
        try(InputStream input = src;
            OutputStream out = dest) {
            byte[] data = new byte[1024];
            int len;
            while((len = input.read(data)) != -1) {
                out.write(data, 0, len);
            }
        }
    }
}
